package com.frxuexi.park2210.sign

import androidx.lifecycle.MutableLiveData
import com.frxuexi.lib_base.mvvm.BaseViewModel
import com.frxuexi.lib_base.net.ApiService
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class SignViewModel @Inject constructor(val apiService: ApiService):BaseViewModel() {

    var signSuc = MutableLiveData<String>()
    var getSignSuc = MutableLiveData<String>()

    fun sign(map: Map<String,Any>){
        httpRequest({apiService.sign(mapToBody(map))},signSuc::postValue)
    }

    fun getSigns(map: Map<String, Int>){
        httpRequest({apiService.getSigns(mapToBody(map))},getSignSuc::postValue)
    }
}